import { Component } from '@tarojs/taro'
import { View  , Image} from '@tarojs/components';
import { baseImgSrc } from '../../util/base_url';
import { AtButton , AtInput } from 'taro-ui';
import './applyTwo.scss';
export default class ApplyTwo extends Component{
    constructor(){
        super()
        this.state = {
            name:"",
            idCard:"",
        }
    }
    onNameChange(value){
        this.setState({name:value});
        return value;
    }
    onIdCardChange(value){
        this.setState({idCard:value});
        return value
    }
    render(){
        let { name , idCard } = this.state;
        return(
            <View className='apply-two'>
                <View className='apply-box'>
                    <AtInput
                        name='value1'
                        title='姓名'
                        type='text'
                        placeholder='请输入姓名'
                        value={name}
                        clear
                        onChange={this.onNameChange.bind(this)}
                    />
                    <AtInput
                        name='value2'
                        title='身份证号'
                        type='idcard'
                        placeholder='请输入身份证号码'
                        value={idCard}
                        clear
                        onChange={this.onIdCardChange.bind(this)}
                    />
                    <View className='chose-pic first-chose'>
                        <Image className='pic-defalt' src={`${baseImgSrc}/no_image.png`} />
                        <View className='tips'>点击上传身份证正面照片</View>
                    </View>
                    <View className='chose-pic'>
                        <Image className='pic-defalt' src={`${baseImgSrc}/no_image.png`} />
                        <View className='tips'>点击上传身份证反面照片</View>
                    </View>
                    <View className='chose-pic'>
                        <Image className='pic-defalt' src={`${baseImgSrc}/no_image.png`} />
                        <View className='tips'>点击上传手持身份证正面照片</View>
                    </View>
                    <AtButton className='next-tip' type='primary' size='normal'>下一步</AtButton>
                </View>
            </View>
        )
    }
}